package com.cf.apiInstance.service.impl;

import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cf.apiInstance.dao.TenderBulletinMapper;
import com.cf.apiInstance.domain.TenderBulletin;
import com.cf.apiInstance.service.PrtcService;
import com.cf.apiInstance.vo.TenderBulletinVo;

/**
 * XX接口实现类
 * 
 * @author: cf
 * @date: 30 Nov 2018 10:29:47 am
 * @vesion: 1.0
 */
@Service
public class PrtcServiceImpl implements PrtcService {

	@Resource
	private TenderBulletinMapper tenderBulletinMapper;

	@Transactional
	@Override
	public void save(List<TenderBulletinVo> submit) {
		submit.forEach(v -> {
			tenderBulletinMapper.insert(new TenderBulletin(v.getTenderProjectCode(), v.getProjectType(), v.getProjectArea(), v.getProjectName(), v.getTenderMode(), v.getQualType(),
					v.getEvaluatingMethod(), v.getTenderCompany(), new Date()));
		});
	}

}
